package domain;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class BossReadGeotopCSV {
	private static String name = "voxels_37w";
	private static final String VOXELFILE = "C:/Data/GeoTOP/37wInput/voxels_37w.csv";
	private static final String METADATA = "C:/Data/GeoTOP/37wOutput/" + "meta_" + "37w.csv";

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Geotop geotop = new Geotop(name);
		BufferedReader reader = null;
		try{
			reader = new BufferedReader(new FileReader(new File(VOXELFILE)));
			geotop.populate(reader);
		}
		catch(FileNotFoundException fnf){
			fnf.printStackTrace();
		}
		finally{
			if(reader != null){
				try{
				reader.close();
				}
				catch(IOException e){}
			}
		}
		geotop.writeMetaData(new File(METADATA));
	}
}
